Thực đơn
MathML Ví dụVốn được viết theo ngữ pháp TeX:
x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}
Sẽ có thể được viết bằng MathML:
<math> <mrow> <mi>x</mi> <mo>=</mo> <mfrac> <mrow> <mrow> <mo>-</mo> <mi>b</mi> </mrow> <mo>±</mo> <msqrt> <mrow> <msup> <mi>b</mi> <mn>2</mn> </msup> <mo>-</mo> <mrow> <mn>4</mn> <mo></mo> <mi>a</mi> <mo></mo> <mi>c</mi> </mrow> </mrow> </msqrt> </mrow> <mrow> <mn>2</mn> <mo></mo> <mi>a</mi> </mrow> </mfrac> </mrow></math>
Nếu muốn hiển thị đúng trong trình duyệt Mozilla, cần thêm
<?xml version="1.0"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0//EN" "http://www.w3.org/TR/MathML2/dtd/xhtml-math11-f.dtd" [ <!ENTITY mathml "http://www.w3.org/1998/Math/MathML"> ] >
Và lưu giữ các mã này trong tập tin có đuôi .xml
.
Như trong ví dụ trên:
<?xml version="1.0"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0//EN" "http://www.w3.org/TR/MathML2/dtd/xhtml-math11-f.dtd" [ <!ENTITY mathml "http://www.w3.org/1998/Math/MathML"> ] ><body><math xmlns="&mathml;"><mrow> <mi>x</mi> <mo>=</mo> <mfrac> <mrow> <mrow> <mo>-</mo> <mi>b</mi> </mrow> <mo>±</mo> <msqrt> <mrow> <msup> <mi>b</mi> <mn>2</mn> </msup> <mo>-</mo> <mrow> <mn>4</mn> <mo></mo> <mi>a</mi> <mo></mo> <mi>c</mi> </mrow> </mrow> </msqrt> </mrow> <mrow> <mn>2</mn> <mo></mo> <mi>a</mi> </mrow> </mfrac></mrow></math></body>
Thực đơn
MathML Ví dụLiên quan
MathML Mathilde, Vương hậu Bỉ Mathilda Twomey Mathilde I xứ Boulogne Mathilde Moraeau Mathilde-Amivi Petitjean Mathilde HallaTài liệu tham khảo
WikiPedia: MathML http://www.dessci.com/en/products/mathplayer/ http://www.editix.com http://www.mathmlcentral.com/ http://www.mathmlcentral.com/Tools/ToMathML.jsp http://www.xmlblueprint.com http://www1.chapman.edu/~jipsen/asciimath.html http://pear.math.pitt.edu/mathzilla/itex2mml.html http://pear.math.pitt.edu/mathzilla/itex2mmlItex.h... http://www.mozilla.org/projects/mathml/ http://www.mozilla.org/projects/mathml/authoring.h...